<?php
/**
 * Template Name: startUpdatePI
 *
 * 更新PI值
 * date:2011/5/9 
 * @author yuyue 
 * 
 */
$siteurl = get_bloginfo('template_url'); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>更新PI值</title> 
<script type="text/javascript" src="<?php bloginfo('template_url');?>/js/lib/jquery.js" ></script>
<script type="text/javascript">
function startUpatePi(){
	 
	$.ajax({
        type:"GET",
        url:"?page_id=41633",
      //  data:{userName:$("#txtUser").val(),userPwd:$("#txtPassword").val()},
        beforeSend:function(){
               $("#loading").show();
               $("#startbtn").attr('disabled', true);
         },             
        success:function(data){ 
          	   $("#loading").hide(); 
               $("#startbtn").attr('disabled', false);          	   
        }            
     });

}
  

</script> 
 </head>
<body>
  <input type=button id="startbtn"  onclick="startUpatePi();" value="启动更新"/><span style="display:none;" id="loading"><img src="<?php bloginfo('template_url');?>/images/loading.gif" /></span>
  <?php ignore_user_abort(); // run script in background
     set_time_limit(0); // run script forever?>
</body>
</html>